Change in openvpn[master]: Add Android cmake building
A message that is not in the archive (sent off-list or not yet received): gerrit.1739460301000.If6afa1108f9234f98afdbe0de7b7320403871772@...2715...
Attention is currently required from: flichtenheld.
Hello flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
to review the following change.
Change subject: Add Android cmake building
......................................................................
Add Android cmake building
There is a mode to build with a real Android NDK that requires setting up cmake to build with the NDK and so. For quick&dirty compile tests that do not actually use the Android NDK on Linux, -DFAKE_ANDROID on Linux can be used to compile a binary using TARGET_ANDROID.
---
M CMakeLists.txt
M config.h.cmake.in
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/895/1
CMakeLists.txt +9 -1
@@ -39,6 +39,7 @@ option(ENABLE_LZO "BUILD with lzo" ON) option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +option(FAKE_ANDROID "Target Android but do not use actual cross compile/Android cmake to build for simple compile checks on Linux") set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory")
@@ -122,7 +123,14 @@ set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${FAKE_ANDROID}) + set(TARGET_ANDROID YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_SITNL YES) + set(HAVE_LINUX_TYPES_H 1) + # Wacky workaround as OpenSSL package detection is otherwise broken (https://stackoverflow.com/questions/45958214/android-cmake-could-not-find-openssl) + list(APPEND CMAKE_FIND_ROOT_PATH ${OPENSSL_ROOT_DIR}) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_LINUX YES) set(ENABLE_ASYNC_PUSH YES) set(ENABLE_LINUXDCO YES)
config.h.cmake.in +3 -0
@@ -432,6 +432,9 @@ /* Are we running WIN32? */ #cmakedefine TARGET_WIN32 +/* Are we targeting Android? */ +#cmakedefine TARGET_ANDROID + #define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" /* Enable GNU extensions on systems that have them. */
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772
Gerrit-Change-Number: 895
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: plaisthos.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/895?usp=email )
Change subject: Add Android cmake building
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772
Gerrit-Change-Number: 895
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Fri, 14 Feb 2025 10:28:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: plaisthos.
Hello flichtenheld,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
to look at the new patch set (#3).
The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied now.
Change subject: Add Android cmake building
......................................................................
Add Android cmake building
There is a mode to build with a real Android NDK that requires setting up cmake to build with the NDK and so. For quick&dirty compile tests that do not actually use the Android NDK on Linux, -DFAKE_ANDROID on Linux can be used to compile a binary using TARGET_ANDROID.
---
M CMakeLists.txt
M config.h.cmake.in
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/895/3
CMakeLists.txt +9 -1
@@ -39,6 +39,7 @@ option(ENABLE_LZO "BUILD with lzo" ON) option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +option(FAKE_ANDROID "Target Android but do not use actual cross compile/Android cmake to build for simple compile checks on Linux") set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory")
@@ -122,7 +123,14 @@ set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${FAKE_ANDROID}) + set(TARGET_ANDROID YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_SITNL YES) + set(HAVE_LINUX_TYPES_H 1) + # Wacky workaround as OpenSSL package detection is otherwise broken (https://stackoverflow.com/questions/45958214/android-cmake-could-not-find-openssl) + list(APPEND CMAKE_FIND_ROOT_PATH ${OPENSSL_ROOT_DIR}) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_LINUX YES) set(ENABLE_ASYNC_PUSH YES) set(ENABLE_LINUXDCO YES)
config.h.cmake.in +3 -0
@@ -432,6 +432,9 @@ /* Are we running WIN32? */ #cmakedefine TARGET_WIN32 +/* Are we targeting Android? */ +#cmakedefine TARGET_ANDROID + #define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" /* Enable GNU extensions on systems that have them. */
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772
Gerrit-Change-Number: 895
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newpatchset
PATCH v3 1/1 Add Android cmake building
In reply to a message not in the archiveFrom: Arne Schwabe <[email protected]...>
There is a mode to build with a real Android NDK that requires setting up cmake to build with the NDK and so. For quick&dirty compile tests that do not actually use the Android NDK on Linux, -DFAKE_ANDROID on Linux can be used to compile a binary using TARGET_ANDROID.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/895
This mail reflects revision 3 of this Change.
Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>
CMakeLists.txt +9 -1
@@ -39,6 +39,7 @@ option(ENABLE_LZO "BUILD with lzo" ON) option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +option(FAKE_ANDROID "Target Android but do not use actual cross compile/Android cmake to build for simple compile checks on Linux") set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory")
@@ -122,7 +123,14 @@ set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${FAKE_ANDROID}) + set(TARGET_ANDROID YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_SITNL YES) + set(HAVE_LINUX_TYPES_H 1) + # Wacky workaround as OpenSSL package detection is otherwise broken (https://stackoverflow.com/questions/45958214/android-cmake-could-not-find-openssl) + list(APPEND CMAKE_FIND_ROOT_PATH ${OPENSSL_ROOT_DIR}) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_LINUX YES) set(ENABLE_ASYNC_PUSH YES) set(ENABLE_LINUXDCO YES)
config.h.cmake.in +3 -0
@@ -432,6 +432,9 @@ /* Are we running WIN32? */ #cmakedefine TARGET_WIN32 +/* Are we targeting Android? */ +#cmakedefine TARGET_ANDROID + #define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" /* Enable GNU extensions on systems that have them. */
[Openvpn-devel] [PATCH applied] Re: Add Android cmake building
Since I do not use cmake, I haven't tested this myself - but it looks good and has an ACK from Frank.
Your patch has been applied to the master branch.
commit 6e16dc6216a9ce5a03292d64420d88582829c533
Author: Arne Schwabe Date: Fri Feb 14 13:52:38 2025 +0100
Add Android cmake building
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30885.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [S] Change in openvpn[master]: Add (fake) Android cmake building
In reply to a message not in the archivecron2 has uploaded a new patch set (#4) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/895?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld
Change subject: Add (fake) Android cmake building
......................................................................
Add (fake) Android cmake building
There is a mode to build with a real Android NDK that requires setting up cmake to build with the NDK and so.
For quick&dirty compile tests that do not actually use the Android NDK on Linux, -DFAKE_ANDROID on Linux can be used to compile a binary using TARGET_ANDROID.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30885.html
---
M CMakeLists.txt
M config.h.cmake.in
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/895/4
CMakeLists.txt +9 -1
@@ -39,6 +39,7 @@ option(ENABLE_LZO "BUILD with lzo" ON) option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +option(FAKE_ANDROID "Target Android but do not use actual cross compile/Android cmake to build for simple compile checks on Linux") set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory")
@@ -122,7 +123,14 @@ set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${FAKE_ANDROID}) + set(TARGET_ANDROID YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_SITNL YES) + set(HAVE_LINUX_TYPES_H 1) + # Wacky workaround as OpenSSL package detection is otherwise broken (https://stackoverflow.com/questions/45958214/android-cmake-could-not-find-openssl) + list(APPEND CMAKE_FIND_ROOT_PATH ${OPENSSL_ROOT_DIR}) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_LINUX YES) set(ENABLE_ASYNC_PUSH YES) set(ENABLE_LINUXDCO YES)
config.h.cmake.in +3 -0
@@ -432,6 +432,9 @@ /* Are we running WIN32? */ #cmakedefine TARGET_WIN32 +/* Are we targeting Android? */ +#cmakedefine TARGET_ANDROID + #define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" /* Enable GNU extensions on systems that have them. */
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772
Gerrit-Change-Number: 895
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
[Openvpn-devel] [S] Change in openvpn[master]: Add (fake) Android cmake building
In reply to a message not in the archivecron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/895?usp=email )
Change subject: Add (fake) Android cmake building
......................................................................
Add (fake) Android cmake building
There is a mode to build with a real Android NDK that requires setting up cmake to build with the NDK and so.
For quick&dirty compile tests that do not actually use the Android NDK on Linux, -DFAKE_ANDROID on Linux can be used to compile a binary using TARGET_ANDROID.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30885.html
---
M CMakeLists.txt
M config.h.cmake.in
2 files changed, 12 insertions(+), 1 deletion(-)
CMakeLists.txt +9 -1
@@ -39,6 +39,7 @@ option(ENABLE_LZO "BUILD with lzo" ON) option(ENABLE_PKCS11 "BUILD with pkcs11-helper" ON) option(USE_WERROR "Treat compiler warnings as errors (-Werror)" ON) +option(FAKE_ANDROID "Target Android but do not use actual cross compile/Android cmake to build for simple compile checks on Linux") set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory")
@@ -122,7 +123,14 @@ set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${FAKE_ANDROID}) + set(TARGET_ANDROID YES) + set(ENABLE_ASYNC_PUSH YES) + set(ENABLE_SITNL YES) + set(HAVE_LINUX_TYPES_H 1) + # Wacky workaround as OpenSSL package detection is otherwise broken (https://stackoverflow.com/questions/45958214/android-cmake-could-not-find-openssl) + list(APPEND CMAKE_FIND_ROOT_PATH ${OPENSSL_ROOT_DIR}) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_LINUX YES) set(ENABLE_ASYNC_PUSH YES) set(ENABLE_LINUXDCO YES)
config.h.cmake.in +3 -0
@@ -432,6 +432,9 @@ /* Are we running WIN32? */ #cmakedefine TARGET_WIN32 +/* Are we targeting Android? */ +#cmakedefine TARGET_ANDROID + #define TARGET_ALIAS "@CMAKE_SYSTEM_NAME@" /* Enable GNU extensions on systems that have them. */
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/895?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6afa1108f9234f98afdbe0de7b7320403871772
Gerrit-Change-Number: 895
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged